package net.leolink.android.simpleinfinitecarousel;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TabHost;
import android.widget.TabHost.TabSpec;

public class TabMain extends TabActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tab_main);
		
		TabHost tabhost=getTabHost();
		
		//tabdetail
		TabSpec tabdetail=tabhost.newTabSpec("Detail");
		tabdetail.setIndicator("Detail", getResources().getDrawable(R.drawable.detail));
		Intent detailIntent = new Intent(this, MainActivity.class);
		tabdetail.setContent(detailIntent);
		
		//tabhistory
		TabSpec tabhistory=tabhost.newTabSpec("History");
		tabhistory.setIndicator("History", getResources().getDrawable(R.drawable.ic_home));
		Intent historyIntent = new Intent(this, History.class);
		tabhistory.setContent(historyIntent);
		
		
		//tabDelete
		TabSpec tabdelete=tabhost.newTabSpec("Delete");
		tabdelete.setIndicator("Delete", getResources().getDrawable(R.drawable.ic_home));
		Intent deleteIntent = new Intent(this, History.class);
		tabdelete.setContent(deleteIntent);
		
		//adding all tab 
		tabhost.addTab(tabdetail);
		tabhost.addTab(tabhistory);
		tabhost.addTab(tabdelete);
		
	}



}
